#include <iostream>
#include "employee.hpp"
#include <cstdlib>
#include <ctime>
#include <map>


void printmap(std::map<int,Employee> empMap)
{
	for(std::map<int,Employee>::iterator it=empMap.begin();it!=empMap.end();it++)
	{
		std::cout<<it->second.getName()<<" "<<it->second.getSalary()<<" "<<it->second.getDepartment()<<std::endl;
		std::cout<<"his id is "	<<it->first  <<std::endl;
		std::cout << std::endl;
	}
}

int main()
{
	map<int,Employee> empMap;
    srand(time(0));
	for(int i=0;i<10;i++)
	{
		Employee emp;
		emp.setName("hh"+to_string(i));
		emp.setSalary(rand() % 10000);
		int buffer = rand() % 3;
		if(buffer == 0)
			emp.setDepartment("design");
		else if(buffer == 1)
		{
			emp.setDepartment("art");
		}
		else if(buffer == 2)
		{
			emp.setDepartment("rescarch");
		}
		empMap.insert(pair<int,Employee>(i,emp));
	}
	printmap(empMap);

	return 0;
}
